#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<string>

using namespace std;

class Person
{
public:
	Person()
	{}
	Person(string name, string phone, string adress, int age)
		:name(name),
		phone(phone),
		adress(adress),
		age(age){}
	Person(const Person& p)
	{
		*this = p;
	}
	Person& operator=(const Person& p)
	{
		name = p.name;
		phone = p.phone;
		adress = p.adress;
		age = p.age;
		return *this;
	}
protected:
	string name = "Jack";
	string phone = "00000000";
	string adress = "China";
	int age = 18;
};


class Student : public Person
{
public:
	Student()
	{}
	Student(string name, string phone, string adress, int age, string student_card)
		:Person(name,phone,adress,age),
		student_card(student_card){}
	Student(const Student& s)
	{
		*this = s;
	}
	Student& operator=(const Student& p)
	{
		Person::operator=(p);
		student_card = p.student_card;
		return *this;
	}
	void whoami()
	{
		cout << name << ' ' << phone << ' ' << adress << ' '<< student_card << endl;
	}
private:
	string student_card = "1234";
};



int main()
{
	Person p1;
	Person p2({ "zzy","13596198298","Changchun",19 });
	Person p3 = p2;

	Student s1;
	Student s2({ "zzy","13596198298","Changchun",19,"20231464" });
	Student s3;
	s3 = s2;
	s3.whoami();
	return 0;
}